<%--
  Created by IntelliJ IDEA.
  User: cjegzfz
  Date: 2020/9/3
  Time: 7:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page trimDirectiveWhitespaces="true"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName()
            + ":" + request.getServerPort() + path + "/";
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <link href="<%=basePath%>Css/Content.css" rel="stylesheet" type="text/css" />
    <!-- Bootstrap Core CSS -->
    <link href="<%=basePath%>Css/bootstrap.min.css" rel="stylesheet" />
    <link href="<%=basePath%>Css/dataTables.bootstrap.css" rel="stylesheet" />
    <link href="<%=basePath%>Css/metisMenu.min.css" rel="stylesheet" />
    <!-- 引入js文件 -->
    <!-- jQuery -->
    <script src="<%=basePath%>js/jquery-1.11.3.min.js"></script>
    <!-- Bootstrap Core JavaScript -->
    <script src="<%=basePath%>js/bootstrap.min.js"></script>
    <!-- Metis Menu Plugin JavaScript -->
    <script src="<%=basePath%>js/metisMenu.min.js"></script>
    <!-- DataTables JavaScript -->
    <script src="<%=basePath%>js/jquery.dataTables.min.js"></script>
    <script src="<%=basePath%>js/dataTables.bootstrap.min.js"></script>

    <!-- Custom Theme JavaScript -->
    <script src="<%=basePath%>js/sb-admin-2.js"></script>
    <script type="text/javascript">
        function deleteShop(goodsId) {
            if(confirm('确实要删除该信息吗?')){
                $.post("<%=basePath%>/deleteGoods.action",{"goodsId":goodsId},
                    function (data) {
                        if (data == "OK"){
                            alert("删除成功！");
                            window.location.reload();
                        }
                        else {
                            alert("删除失败！");
                            window.location.reload();
                        }
                    }
                )
            }
        }
        //此js用于将数据填入修改模态框中作为初始值
        function editShop(goodsId) {
            $.ajax({
                type:"get",
                url:"<%=basePath%>/getGoodsById.action",
                data:{"goodsId":goodsId},
                success:function (data) {
                    console.log(data)
                    $("#goodsId").val(data.goodsId);
                    $("#goodsName").val(data.goodsName);
                    $("#goodsPrice").val(data.goodsPrice);

                }
            });
        }
    function updateShop() {
        $.post("<%=basePath%>/updateGoods.action  ",$("#edit_loan_form").serialize(),function (data) {
            if(data =="OK"){
                alert("更新成功！");
                window.location.reload();
            }else{
                alert("更新失败！");
                window.location.reload();
            }
        })
    }
    </script>
</head>
<body>

<div class="div_top">班级信息管理 &gt; 查询班级信息</div>
<div class="row">
    <div class="col-sm-11">
        <div class="span12">
            <div class="btn-group-vertical">
                <h3 style="margin-top: 40px">选择班级查看学生成绩</h3>
                <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                    选择班级
                    <span class="caret"></span>
                </button>
                <ul class="dropdown-menu">
                    <li><a href="/toClassAdd.action" target="last_frm"> 添加班级</a></li>

                    <c:forEach items="${cClasses}" var="cClass" >
                        <li><a href="/findGradeBystudentClass.action?studentClass=${cClass.studentClass}" target="last_frm"> ${cClass.studentClass}</a></li>

                    </c:forEach>

                </ul>






<%--                <ul class="dropdown-menu">--%>
<%--                    <c:forEach items="${CClasses}" var="cclass">--%>
<%--                    <li><a href="/findGradeBystudentClass.action?studentClass=${cclass.studentClass}" target="last_frm"> ${cclass.studentClass}</a></li>--%>
<%--                    </c:forEach>--%>

<%--                </ul>--%>
            </div>
        </div>
    </div>
</div>
<div class="divider"></div>
<div class="div_con">
    <iframe name="last_frm" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="100%" style="overflow:hidden;" src=""></iframe>


</div>
</body>
</html>

